import {Tools} from "weaver-mobile";

export const getData = (params = {url: "", params: {}}) => {
    return Tools.callApi({
        ...params,
        params: {
            ...params.params,
            ismobile: 1,
        },
    });
};
export const getPortalInstock = params => { //获取待验收资产
    const options = {
        method: "GET",
        url: "/api/cpt/moblie/capitalportal/getPortalInstock",
        params: {
            ...params,
            ismobile: 1
        }
    };
    return Tools.callApi(options);
};
export const getPortalMyCapital = params => { //获取我的资产
    const options = {
        method: "GET",
        url: "/api/cpt/moblie/capitalportal/getPortalMyCapital",
        params: {
            ...params,
            ismobile: 1
        }
    };
    return Tools.callApi(options);
};
export const doInstockDelete = id => { //作废
    const options = {
        method: "GET",
        url: "/api/cpt/moblie/capitalportal/doInstockDelete",
        params: {
            id: id,
            ismobile: 1
        }
    };
    return Tools.callApi(options);
};
export const getPortalCount = params => { //总数
    const options = {
        method: "GET",
        url: "/api/cpt/moblie/capitalportal/getPortalCount",
        params: {
            ...params,
            ismobile: 1
        }
    };
    return Tools.callApi(options);
};
export const getCapitalForm = params => { //assetInfoForm
    const options = {
        method: "GET",
        url: "/api/cpt/moblie/capitalmanager/getCapitalForm",
        params: {
            ...params,
            ismobile: 1
        }
    };
    return Tools.callApi(options);
};
export const getCapitalFlowList = params => { //流转日志长列表
    const options = {
        method: "GET",
        url: "/api/cpt/moblie/capitalmanager/getCapitalFlowList",
        params: {
            ...params,
            ismobile: 1
        }
    };
    return Tools.callApi(options);
};
export const getCapitalChangeList = params => { //变更日志长列表
    const options = {
        method: "GET",
        url: "/api/cpt/moblie/capitalmanager/getCapitalChangeList",
        params: {
            ...params,
            ismobile: 1
        }
    };
    return Tools.callApi(options);
};
export const getCapitalEditForm = params => { //编辑
    const options = {
        method: "GET",
        url: "/api/cpt/moblie/capitalmanager/getCapitalEditForm",
        params: {
            ...params,
            ismobile: 1
        }
    };
    return Tools.callApi(options);
};
export const doCapitalEdit = params => { //保存
    const options = {
        method: "GET",
        url: "/api/cpt/moblie/capitalmanager/doCapitalEdit",
        params: {
            ...params,
            ismobile: 1
        }
    };
    return Tools.callApi(options);
};
export const getInstockList = params => { //待验收列表
    const options = {
        method: "GET",
        url: "/api/cpt/moblie/capitalportal/getInstockList",
        params: {
            ...params,
            ismobile: 1
        }
    };
    return Tools.callApi(options);
};
export const getInstockListHis = params => { //获取已验收入库历史列表
    const options = {
        method: "GET",
        url: "/api/cpt/moblie/capitalportal/getInstockListHis",
        params: {
            ...params,
            ismobile: 1
        }
    };
    return Tools.callApi(options);
};


export const getCptManagerForm = params => {
    const options = {
        method: "GET",
        url: "/api/cpt/moblie/capitalmanager/getCptManagerForm",
        params: {
            ...params,
            ismobile: 1
        }
    };
    return Tools.callApi(options);
};


export const getInstockDetail = params => { //详情
    const options = {
        method: "GET",
        url: "/api/cpt/moblie/capitalportal/getInstockDetail",
        params: {
            ...params,
            ismobile: 1
        }
    };
    return Tools.callApi(options);
};
export const doInstockCheck = params => { //验收校验
    const options = {
        method: "GET",
        url: "/api/cpt/moblie/capitalportal/doInstockCheck",
        params: {
            ...params,
            ismobile: 1
        }
    };
    return Tools.callApi(options);
};
export const doInstockCapital = params => { //验收提交
    const options = {
        method: "GET",
        url: "/api/cpt/moblie/capitalportal/doInstockCapital",
        params: {
            ...params,
            ismobile: 1
        }
    };
    return Tools.callApi(options);
};
export const getInventoryForm = params => {
    const options = {
        method: "GET",
        url: "/api/cpt/moblie/inventory/getInventoryForm",
        params: {
            ...params,
            ismobile: 1
        }
    };
    return Tools.callApi(options);
};

export const doInventory = params => {
    const options = {
        method: "GET",
        url: "/api/cpt/moblie/inventory/doInventory",
        params: {
            ...params,
            ismobile: 1
        }
    };
    return Tools.callApi(options);
};

export const getCapitalReport = params => {
    const options = {
        method: "GET",
        url: "/api/cpt/moblie/capitalreport/getCapitalReport",
        params: {
            ...params,
            ismobile: 1
        }
    };
    return Tools.callApi(options);
};

export const doCptIfOverAjax = params => {  //资产管理校验
    const options = {
        method: "GET",
        url: "/api/cpt/moblie/capitalmanager/doCptIfOverAjax",
        params: {
            ...params,
            ismobile: 1
        }
    };
    return Tools.callApi(options);
};

export const doCptManager = params => { //资产管理提交
    const options = {
        method: "GET",
        url: "/api/cpt/moblie/capitalmanager/doCptManager",
        params: {
            ...params,
            ismobile: 1
        }
    };
    return Tools.callApi(options);
};

export const doCapitalDel = params => { //删除资产
    const options = {
        method: "GET",
        url: "/api/cpt/moblie/capitalmanager/doCapitalDel",
        params: {
            ...params,
            ismobile: 1
        }
    };
    return Tools.callApi(options);
};


export const doSubmitInventory = params => {
    const options = {
        method: "GET",
        url: "/api/cpt/moblie/inventory/doSubmitInventory",
        params: {
            ...params,
            ismobile: 1
        }
    };
    return Tools.callApi(options);
};
export const getMyInventoryList = params => {
    const options = {
        method: "GET",
        url: "/api/cpt/moblie/inventory/getMyInventoryList",
        params: {
            ...params,
            ismobile: 1
        }
    };
    return Tools.callApi(options);
};
export const getInventoryListDetail = params => {
    const options = {
        method: "GET",
        url: "/api/cpt/moblie/inventory/getInventoryListDetail",
        params: {
            ...params,
            ismobile: 1
        }
    };
    return Tools.callApi(options);
};


export const scanQRCodeCapital = params => {
    const options = {
        method: "GET",
        url: "/api/cpt/moblie/capitalmanager/scanQRCodeCapital",
        params: {
            ...params,
            ismobile: 1
        }
    };
    return Tools.callApi(options);
};


export const getCptMenuRight = params => {
    const options = {
        method: "GET",
        url: "/api/cpt/moblie/capitalportal/getCptMenuRight",
        params: {
            ...params,
            ismobile: 1
        }
    };
    return Tools.callApi(options);
};


